//
//  LineNode.h
//  HKOCRuler
//
//  Created by lbxia on 2018/11/23.
//  Copyright © 2018年 lbx. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <ARKit/ARKit.h>
#import <SceneKit/SceneKit.h>
#import "Utilities.h"

API_AVAILABLE(ios(11.0))
@interface LineNode : NSObject

@property (nonatomic, strong) SCNNode *startNode;
@property (nonatomic, strong) SCNNode *endNode;

@property (nonatomic, strong) SCNNode *lineNode;

@property (nonatomic, strong) SCNNode *textNode;

@property (nonatomic, strong) SCNNode *textWrapNode;

@property (nonatomic, strong) ARSCNView *sceneView;

@property (nonatomic, assign) NSInteger idx;

@property (nonatomic, strong) NSMutableArray<SCNVector3OBJ*> *recentFocusSquarePositions;


- (instancetype)initWithStartPos:(SCNVector3)startpos sceneV:(ARSCNView*)sceneV cameraNode:(SCNNode*)cameraNode;


- (CGFloat)updatePosition:(SCNVector3)pos camera:(ARCamera*)camera;


- (void)removeFromParent;

@end
